﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>xge_event结构 (消息通知)</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
html,body { 
	/* Default Font */
	font-family: 宋体, Arial, Helvetica, sans-serif;
	font-size: 10pt;
}
</style>

</head>

<body>
<P>
<TABLE style="BORDER-COLLAPSE: collapse" border=1 cellSpacing=0 
borderColor=#000000 cellPadding=1 width=800>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>&nbsp;定义</FONT></P></TD>
    <TD width=680><FONT size=2><STRONG><FONT color=#0000ff>C++：</FONT></STRONG><br>struct xge_event
<br>{
<br>&nbsp;&nbsp;int tpe;
<br>&nbsp;&nbsp;union
<br>&nbsp;&nbsp;{
<br>&nbsp;&nbsp;&nbsp;&nbsp;struct
<br>&nbsp;&nbsp;&nbsp;&nbsp;{
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int scancode;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int ascii;
<br>&nbsp;&nbsp;&nbsp;&nbsp;};
<br>&nbsp;&nbsp;&nbsp;&nbsp;struct
<br>&nbsp;&nbsp;&nbsp;&nbsp;{
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int x;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int y;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int dx;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int dy;
<br>&nbsp;&nbsp;&nbsp;&nbsp;};
<br>&nbsp;&nbsp;&nbsp;&nbsp;struct
<br>&nbsp;&nbsp;&nbsp;&nbsp;{
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int param1;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int param2;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int param3;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int param4;
<br>&nbsp;&nbsp;&nbsp;&nbsp;};
<br>&nbsp;&nbsp;&nbsp;&nbsp;int button;
<br>&nbsp;&nbsp;&nbsp;&nbsp;int z;
<br>&nbsp;&nbsp;&nbsp;&nbsp;int w;
<br>&nbsp;&nbsp;};
<br>};<br><br><STRONG><FONT color=#0000ff>FreeBasic：</FONT></STRONG><br>Type xge_event Field = 1
<br>&nbsp;&nbsp;tpe As Integer
<br>&nbsp;&nbsp;Union
<br>&nbsp;&nbsp;&nbsp;&nbsp;Type
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scancode As Integer
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ascii As Integer
<br>&nbsp;&nbsp;&nbsp;&nbsp;End Type
<br>&nbsp;&nbsp;&nbsp;&nbsp;Type
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x As Integer
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y As Integer
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dx As Integer
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dy As Integer
<br>&nbsp;&nbsp;&nbsp;&nbsp;End Type
<br>&nbsp;&nbsp;&nbsp;&nbsp;Type
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;param1 As Integer
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;param2 As Integer
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;param3 As Integer
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;param4 As Integer
<br>&nbsp;&nbsp;&nbsp;&nbsp;End Type
<br>&nbsp;&nbsp;&nbsp;&nbsp;button As Integer
<br>&nbsp;&nbsp;&nbsp;&nbsp;z As Integer
<br>&nbsp;&nbsp;&nbsp;&nbsp;w As Integer
<br>&nbsp;&nbsp;End Union
<br>End Type<br><br><STRONG><FONT color=#0000ff>SDK_C：</FONT></STRONG><br>暂未公布<br><br><STRONG><FONT color=#0000ff>SDK_BASIC：</FONT></STRONG><br>暂未公布<br><br><STRONG><FONT color=#0000ff>SDK_Pascal：</FONT></STRONG><br>暂未公布<br><br><STRONG><FONT color=#0000ff>SDK_易语言：</FONT></STRONG><br>暂未公布<br><br></FONT></TD></TR>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>&nbsp;成员含义</FONT></P></TD>
    <TD width=680><FONT size=2><br><STRONG><FONT color=#0000ff>tpe：</FONT></STRONG><br>消息分发器中获取到的消息类型 [在实际应用中无意义]。<br><br><STRONG><FONT color=#0000ff>scancode：</FONT></STRONG><br>在键盘相关消息中使用此项成员可以获取按键扫描码，键盘扫描码表可参考：<A 
      href="keycode.htm">数据参考.按键扫描码</A>。<br><br><STRONG><FONT color=#0000ff>ascii：</FONT></STRONG><br>在键盘相关消息中使用此项成员可以获取按键对应的 ascii 代码，如果按键没有 ascii 代码，则保存 0。<br><br><STRONG><FONT color=#0000ff>x：</FONT></STRONG><br>在鼠标相关消息中使用此项成员可以获取鼠标指针横坐标位置，这个位置是相对场景左上角而言的。<br><br><STRONG><FONT color=#0000ff>y：</FONT></STRONG><br>在鼠标相关消息中使用此项成员可以获取鼠标指针纵坐标位置，这个位置是相对场景左上角而言的。<br><br><STRONG><FONT color=#0000ff>dx：</FONT></STRONG><br>在鼠标相关消息中使用此项成员可以获取鼠标指针横坐标的移动增量。<br><br><STRONG><FONT color=#0000ff>dy：</FONT></STRONG><br>在鼠标相关消息中使用此项成员可以获取鼠标指针纵坐标的移动增量。<br><br><STRONG><FONT color=#0000ff>param1：</FONT></STRONG><br>场景消息预留的附加数据存储空间，共4个。<br><br><STRONG><FONT color=#0000ff>param2：</FONT></STRONG><br>场景消息预留的附加数据存储空间，共4个。<br><br><STRONG><FONT color=#0000ff>param3：</FONT></STRONG><br>场景消息预留的附加数据存储空间，共4个。<br><br><STRONG><FONT color=#0000ff>param4：</FONT></STRONG><br>场景消息预留的附加数据存储空间，共4个。<br><br><STRONG><FONT color=#0000ff>button：</FONT></STRONG><br>鼠标按下或点击消息中使用此项成员可以获取按键的状态，数据存储方式可参考：<A 
      href="../xge/n_input/GetMouseBtn.htm">xge::input::GetMouseBtn</A>。<br><br><STRONG><FONT color=#0000ff>z：</FONT></STRONG><br>在鼠标滚轮事件中使用此项成员可以获取鼠标滚轮的计数。<br><br><STRONG><FONT color=#0000ff>w：</FONT></STRONG><br>预留，目前无意义。<br><br></FONT></TD></TR>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>&nbsp;补充说明</FONT></P></TD>
    <TD width=680><FONT size=2><br>无。<br><br></FONT></TD></TR>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>&nbsp;使用范例</FONT></P></TD>
    <TD width=680><FONT size=2><br><STRONG><FONT color=#0000ff>C++：</FONT></STRONG><br>无范例。<br><br><STRONG><FONT color=#0000ff>FreeBasic：</FONT></STRONG><br>无范例。</FONT></TD></TR></TABLE></P></body></HTML>
